(:
XQuery that gets operations from wsdl
:)

declare namespace ns = "http://www.w3.org/ns/wsdl";
<wsdl-operations>{
let $doc := doc("wsdl.wsdl")

for $operations in $doc//ns:operation
let $name := $operations/@name
let $request := $operations/ns:input/@*
let $response := $operations/ns:output/@*
where not(empty($name))
return

   <operation name="{$name}">
      <request>{$request}</request>
      <response>{$response}</response>
   </operation>
}</wsdl-operations>